function! hhdspacevim#before() abort
"自己的自定义配置
  nnoremap <C-j> 10j
  nnoremap <C-k> 10k
  nnoremap bn :bn<CR>
  nnoremap bp :bp<CR>
  set mouse=r
  nnoremap gl :set hlsearch!<CR>
  nnoremap <S-u> :redo<CR>
"  nnoremap tv :call SpaceVim#lsp#show_doc()<CR>
"  使用th模拟鼠标悬浮状态显示 from lsp.vim
"  在使用coclayer的情况下
"  -> 显示帮助
  nnoremap  th  :call CocActionAsync('doHover')<CR>

" search(查找)
"  -> 查找引用
  nnoremap  sr  :call CocAction('jumpReferences')<CR>
"  -> 在项目中查找symbol，见于space.vim
  "nnoremap <silent><buffer> ss  :call SpaceVim#plugins#flygrep#open({'input' : expand("<cword>"), 'dir' : get(b:, "rootDir", getcwd())})<CR>
  "nnoremap  gs  :Leaderf rg<CR>
  nnoremap sc  :Telescope grep_string<CR>
  nnoremap  ss  :Telescope live_grep<CR>
" 文件相关file
" -> 文本格式化 format  buffer,见于 format.vim
  nnoremap  ff  :Neoformat<CR>
" -> 保存当前buffer到磁盘
  nnoremap  fs  :w<CR>
" -> 关闭文件
  nnoremap fc :q!<CR>
" -> 从磁盘从新加载文件
  nnoremap fe :e!<CR>
" -> 打开最近文件
  nnoremap fr :Telescope oldfiles<CR>

"缓冲区操作
"-- buffer close
  nnoremap bc :bd<CR>

" 语言相关 
  map rr <space>lr

" 使得鼠标可以复制文本 tmux + vim
  set mouse=r

" 没办法修改flygrep默认的搜索的快捷键，哭,放弃啦
" 不要进行此映射了，好多插件默认快捷键是C-c
" 使用<space>;进行 toggle comment line操作
  map <space>; <space>cl

" 修正terminal 关闭快捷键
  tnoremap jk <C-\><C-n>

" 最大匹配内存无限制
  set maxmempattern=2000000


    
endfunction

"function! TestHello() abort
"    echo "hello world"
"endfunction

function! hhdspacevim#after() abort

lua << EOF
require'lspconfig'.sumneko_lua.setup {
  settings = {
    Lua = {
      runtime = {
        -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
        version = 'LuaJIT',
      },
      diagnostics = {
        -- Get the language server to recognize the `vim` global
        globals = {'vim'},
      },
      workspace = {
        -- Make the server aware of Neovim runtime files
        library = vim.api.nvim_get_runtime_file("", true),
      },
      -- Do not send telemetry data containing a randomized but unique identifier
      telemetry = {
        enable = false,
      },
    },
  },
}
EOF


endfunction
